home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Zoom 2
/
Zoom - Release 2 (1996)(Active Software)[!].iso
/
texts
/
dosman121
/
man
/
protect
< prev
next >
Wrap
Text File
|
1995-05-19
|
5KB
|
127 lines
Protect(V1.3, 2.x/3.x in C:)
NAME
Protect - To set file(s) protection status.
SYNOPSIS
1.3:
Protect [File] name [Flags] [s] [p] [a] [r]
[w] [e] [d] [ADD or -] [SUB or -]
2.x/3.x:
Protect [File] name [Flags] [s] [p] [a] [r]
[w] [e] [d] [ADD or -] [SUB or -]
[ALL] [QUIET]
DESCRIPTION
Protect is used to set the protection level of a file
or files. You may set the protection level for multiple
files or directories at a time using wildcards. The flags
that you may set are:
h - hidden file is protected from listing (not supported)
a - archive file has been archived (set by backup programs)
p - pure file may be made resident without fear
s - script file is a script (supported by some shells)
r - read file is readable (supported by some commands)
w - write file is writable (supported by some commands)
e - execute file is executable (supported by some shells)
d - delete file is deletable (system supported)
Setting or adding a flag allows the associated
action. Clearing or subtracting the flag disallows that
action. You can specify a completely new set of flags
for a file by simply listing the flags you want to be
turned on for that file (or files). If you omit a flag,
that flag will be cleared. Protect with no flags
disallows all protections for the file(s) in question.
You can also add or subtract flags to the current set
using the ADD and SUB keywords (see below) or by
preceding the flags with a '+' character or a '-'
character, respectively.
To view the protection bits for a specific filename,
you use the List command. If a flag character is shown in
the LIST display then it is on. If the letter is not
displayed, that bit is off. In that case, there will be
a dash (-) instead of a letter.
The only setting which AmigaDOS acts upon are the
read and write (r and w) bits.
OPTIONS
FLAGS (s p a r w e d)
These are the protection flags which can be turned
on/off with PROTECT. You don't have to include the FLAGS
keyword, just the letters. If a FLAG is turned on then
the operation associated with the flag may be carried
out. If no flags are specified then all the flags are
turned off.
NOTE: If the 'D' flag is set then the COPY command
will not work on that file. This is because the COPY
command actually deletes the old file and replaces it
with the new one.
ADD or [+]
The flags given are to be added to the current set
for the file(s) in question. Other than adding these
flags, the original protection bits of the file(s) will
be left unchanged. Another way to obtain this behavior
is to use a '+' character as the first character of the
flags you wish to add.
SUB or [-]
The flags given are to be removed from the current
set for the file(s) in question. Other than subtracting
these flags, the original protection bits of the file(s)
will not affected. Another way to obtain this behavior
is use a '-' character as the first character of the
flags you wish to subtract.
ALL
2.x/3.x only: Recursively descend directories,
performing the desired operation on each file and
directory for that branch of the directory tree.
FILES
When using wildcards or the ALL keyword, Protect will
change the protection bits for both files and
directories. Using this keyword will cause protect to
only change the protection bits for Files. 1.3 does not
allow you to use wildcards.
DIRS
Like FILES, but changes the protection bits only for
directories.
QUIET [Q]
This causes Protect to do its work silently, without
displaying the files and/or directories it is operating
on.
EXAMPLE
1. To keep all files ending in .c from being deleted
by subtracting the d flag for these files.
Protect #?.c -d
2. To turn on the script and execute bits. These
bits allow some shells to execute the scripts as though
they were programs.
Protect #? +se